package org.fing.edu.uy.admin.mbeanServices;

import javax.management.NotCompliantMBeanException;
import javax.management.StandardMBean;

import org.fing.edu.uy.admin.push.ApplicationManagedSingleton;
import org.fing.edu.uy.admin.push.GlobalCounter;

public class WsReportServices extends StandardMBean implements WsReportServicesMBean {
	
	protected WsReportServices(Class<?> mbeanInterface) throws NotCompliantMBeanException {
		super(mbeanInterface);
	}
	
	@Override
	public void reportInvoke(Long serviceID) {
		GlobalCounter aux = ApplicationManagedSingleton.getInstance().getBeanInstance();
		if(aux != null){
			aux.increment(serviceID);
		}
	}
	
}
